package net.maku.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
import net.maku.system.dao.SysOrgTransferDao;
import net.maku.system.entity.SysOrgTransferEntity;
import net.maku.system.service.SysOrgTransferService;
import org.springframework.stereotype.Service;

/**
 * @Author: qr
 * @Date: 2025/3/16 20:29
 * @Version 1.0
 */
@Service
@AllArgsConstructor
public class SysOrgTransferServiceImpl extends BaseServiceImpl<SysOrgTransferDao, SysOrgTransferEntity> implements SysOrgTransferService {
    @Override
    public IPage<SysOrgTransferEntity> getSysOrgTransfer(Page<SysOrgTransferEntity> page) {
        LambdaQueryWrapper<SysOrgTransferEntity> transferQuery = new LambdaQueryWrapper<SysOrgTransferEntity>().orderByDesc(SysOrgTransferEntity::getCreateTime);
        dataScopeWrapper(transferQuery);
        return this.baseMapper.selectPage(page, transferQuery);
    }
}
